<template>
  <div>
    <div class="recommend-title">周末去哪儿</div>
    <ul class="itemAll">
      <li class="item" v-for="item of list" :key="item.id">
        <div class="item-img-wrapper">
          <img class="item-img" :src="item.imgUrl">
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'homeWeekend',
  props: {
    list: Array
  }
}
</script>

<style scoped>
  .recommend-title{
    line-height: 40px;
    background: #eee;
    text-indent: 10px;
    margin-top: 5px;
  }
  .itemAll{
    margin-top: 15px;
  }
  .item{
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    margin-bottom: 10px;
  }
  .item-img-wrapper{
    width: 96%;
    height: 143px;
    padding: 0 2%;
    overflow: hidden;
  }
  .item-img{
    width: 100%;
    display: block;
  }
  .item-info{
    width: 96%;
    float: right;
    margin-top: 10px;
    padding: 0 2%;
  }
  .item-title{
    color: #007bb8;
    font-size: 16px;
  }
  .item-desc{
    font-size: 14px;
    color:#212121;
    line-height: 30px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .item-button{
    background: #ff9300;
    border: none;
    color: #fff;
    font-size: 14px;
    text-align: center;
    line-height:20px;
  }
</style>
